<template>
  <a-result status="warning" title="您正在申请企业注销，提交申请后 ，本企业将不能再进行其他业务办理，请谨慎选择！">
    <template #extra>
      <a-button key="console" type="danger" @click="btnEvent('1')">
        继续注销
      </a-button>
      <a-button key="console1" type="" @click="btnEvent('2')">
        取消注销
      </a-button>
    </template>
  </a-result>
</template>

<script>
import getDataForDB from '@/api/qsbserviceEnterprise'
export default {
  name: 'EnterpriseCancellation',
  props: {
    coloseEvent: { type: Function },
    serviceInfo: { type: Object }
  },
  methods: {
    btnEvent(type) {
      if (type == '1') {
        console.log('注销');
        // this.$message.warning('测试==》',6)
        getDataForDB('企业端发起企业注销',{entId:this.serviceInfo.data.id}).then(res=>{
          if(res.code == 200){
            this.serviceInfo.index = 14
            this.coloseEvent({mesg:'申请注销服务成功'})
          } else {
            this.$message.warning(res.message)
          }
        })
      }
      if (type == '2') {

        console.log('取消注销');
        this.serviceInfo.index = 14
        this.coloseEvent({mesg:'操作已取消！'})
      }
    }
  },
}
</script>

<style>

</style>

